home *** CD-ROM | disk | FTP | other *** search
/ Interplay's Learn to Program Basic (Review Copy) / Learn to Program Basic Review Copy (Interplay)(June 23, 1998).ISO / pc / ltpbasic / exercise / space.bas < prev    next >
Encoding:
BASIC Source File  |  1998-04-01  |  1.1 KB  |  74 lines

  1. Rem Space Travel
  2. Rem
  3. Rem See SPACE01.BAS and
  4. Rem SPACE02.BAS for other
  5. Rem examples
  6. cls
  7. Print "You're traveling to another planet!"
  8. Print "We need to know how much you weigh: "
  9. input weight
  10. Print "Which planet will you be traveling to?"
  11. Print "Choose a number from the list:"
  12. Print "1. Mercury"
  13. Print "2. Mars"
  14. Print "3. Venus"
  15. Print "4. Earth"
  16. Print "5. Saturn"
  17. Print "6. Uranus"
  18. Print "7. Neptune"
  19. Print "8. Jupiter"
  20. Print "9. Pluto"
  21. input planet
  22.  
  23. if planet = 1 then 
  24. let modify = .37
  25. let planet$ = "Mercury"
  26. endif
  27.  
  28. if planet = 2 then
  29. let modify = .38
  30. let planet$ = "Mars"
  31. endif
  32.  
  33. if planet = 3 then 
  34. let modify = .88
  35. let planet$ = "Venus"
  36. endif
  37.  
  38. if planet = 4 then
  39. let modify = 1.00
  40. let planet$ = "earth"
  41. endif
  42.  
  43. if planet = 5 then
  44. let modify = 1.15
  45. let planet$ = "Saturn"
  46. endif
  47.  
  48. if planet = 6 then 
  49. let modify = 1.17
  50. let planet$ = "Uranus"
  51. endif
  52.  
  53. if planet = 7 then 
  54. let modify = 1.18
  55. let planet$ = "Neptune"
  56. endif
  57.  
  58. if planet = 8 then 
  59. let modify = 2.64
  60. let planet$ = "Jupiter"
  61. endif
  62.  
  63. if planet = 9 then
  64. let modify = 3.07
  65. let planet$ = "Pluto"
  66. endif
  67.  
  68. Print "Your weight on ";
  69. Print planet$;
  70. Print " is ";
  71. Print weight * modify
  72. end 
  73.